package com.erb.mapper;

import com.erb.entity.Pager;
import com.erb.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
	List<Product> selectAll(@Param("pager") Pager pager, @Param("pe") Product product);

	Product selectProductById(@Param("pid") int id);

	int findCount(@Param("pe") Product product);

	long insertProduct(@Param("product") Product product);

	long updateProduct(@Param("product") Product product);

	long deleteProduct(@Param("pid") Integer id);

	long updateProductIncrHaveMoney(@Param("pid") int pid, @Param("haveMoney") double haveMoney);
}
